import { baseUrl, http } from "./http.js"

export function consinfoAPI(params) {
	return http.get(`${baseUrl}/consinfo`, params);
}

export function userinfoAPI(params) {
	return http.get(`${baseUrl}/userinfo`, params);
}

export function categoryAPI(params) {
	return http.get(`${baseUrl}/category`, params);
}
export function addProblemAPI(params) {
	return http.post(`${baseUrl}/question/addProblem`, params);
}
export function uploadAPI(params) {
	return http.post(`${baseUrl}/api/api/upload`, params);
}
export function queryProblemsAPI(params) {
	return http.post(`${baseUrl}/question/queryProblems`, params);
}
export function addAnswerAPI(params) {
	return http.get(`${baseUrl}/addAnswer/{id}`, params);
}

export function GetProblemsAPI(params) {
	return http.get(`${baseUrl}/api/question/GetProblems`, params);
}
export function userOffByIdAPI(params) {
	return http.get(`${baseUrl}/userOffById/{id}`, params);
}

export function GetAnswersAPI(params) {
	return http.get(`${baseUrl}/GetAnswers`, params);
}

export function consOffByIdAPI(params) {
	return http.get(`${baseUrl}/consOffById/{questionId}`, params);
}

export function NumAnswersAPI(params) {
	return http.get(`${baseUrl}/NumAnswers/{userid}`, params);
}

export function getQuestionInfoAPI(params) {
	return http.get(`${baseUrl}/getQuestionInfo`, params);
}